﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace NorthwindEmployeesAndOrders
{
    public partial class NorthwindEmployeesAndOrders : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                this.GridViewEmployees.DataSource = NortwindDBConnection.NorthwindDAO.FetchAllDBEmployees();
                this.GridViewEmployees.DataBind();
            }
        }

        protected void Button_Click(object sender, EventArgs e)
        {
            this.GridViewOrders.DataSource = NortwindDBConnection.NorthwindDAO.FetchDBOrderIDsByEmployeeID(5);
            this.GridViewOrders.DataBind();
        }
    }
}